import { createRouter, createWebHashHistory } from "vue-router";

import layout from "@/layout/index.vue";
const router = createRouter({
    history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
    routes: [{
            path: "/login",
            name: "login",
            component: () =>
                import ("@/views/login/index.vue"),
        },
        {
            path: "/",
            name: "baseLayout",
            component: layout,
            redirect: "/runData",
            hidden: true,
            children: [{
                    path: "runData",
                    name: "runData",
                    component: () =>
                        import ("@/views/runData/index.vue"),
                    meta: { title: "运行数据" },
                },
                {
                    path: "remoteSend",
                    name: "remoteSend",
                    component: () =>
                        import ("@/views/remoteSend/index.vue"),
                    meta: { title: "远程下发" },
                },
            ],
        },
    ],
});

export default router;